<!doctype html>
<html lang="en">
<head>
 @include('web.layout.head')
<link rel="stylesheet" href="{{mix('/css/web/shop/shop_header.css')}}">
<link rel="stylesheet" href="{{mix('/css/web/shop/shop.css')}}">
<title>店铺首页</title>

</head>
<body class="por shop_1">
<div class="mask"></div>
<div class="prompt_box">
    <div class="closebox">
        <img src="{{asset('/img/web/deal/cancle.png')}}" alt="" width="16" height="14">
    </div>
    <div class="prompt_title">联系方式</div>
    <div class="prompt_content">
        <p>商家：<span>111</span></p>
        <p>联系电话：155988888</p>
        <p>您也可以使联系安防管家查找卖家，免费拨打400-016-6889</p>
    </div>
</div>
<div class="headerbox">
    @include('web.layout.product_head')
    @include('web.shop.top_nav')
</div>
<div class="company_tab_box">
    <div class="swiper-container banner">
        <div class="swiper-wrapper">
            @if(!empty($shop['shop_banners']))
                @foreach(array_get($shop,'shop_banners') as $key=>$value)
                    <div class="swiper-slide"><img src="{{$value['banner_image']}}" alt="{{$value['banner_name']}}"></div>
                @endforeach
            @else
                <div class="swiper-slide"><img src="{{asset('/img/web/deal/banner/banner'.$shop['sp_templete'].'.jpg')}}" alt=""></div>
            @endif
        </div>
        <div class="swiper-pagination"></div>
    </div>
{{--    <div class="banner"><img src="{{asset('/img/web/deal/banner/banner'.$shop['sp_templete'].'.jpg')}}" alt=""></div>--}}
    <div class="company_tab" id="supply_index" style="display: block;">
        <div class="company_bigbox">
            <div class="w1200">
                <div class="bigbox_left">
                    <div class="infobox">
                        <div class="titlebox shop_bg{{$shop['sp_templete']}}">
                            <div class="tit">{{$shop['company']['company_name']}}</div>
                        </div>
                        <div class="title_bot">
                            <div class="bot_top">
                                <div class="top_left fl">联系人：</div>
                                <div class="top_right fl"><span>{{$shop['company']['angent']}}</span></div>
                            </div>
                            <div class="bot_top">
                                <div class="top_left fl">经营模式：</div>
                                <div class="top_right fl"><span>{{$shop['company_material']['business_model']}}</span></div>
                            </div>
                            <div class="bot_top">
                                <div class="top_left fl">店铺等级：</div>
                                <div class="top_right fl"><span>{{$shop['shop_level']['lv_txt_tag']}}</span></div>
                            </div>
                            <div class="bot_top">
                                <div class="top_left fl">店铺标识：</div>
                                <div class="top_right fl">
                                    @for($i=0;$i<$shop['shop_level']['lv_ico_tag'];$i++)
                                    <img src="{{asset('/img/web/inc/icon/star2.png')}}"alt="">
                                        @endfor
                                </div>
                            </div>
                            <div class="bot_top" style="height: auto;display: inline-block;">
                                <div class="top_left fl">联系商家：</div>
                                <div class="top_right fl" style="width: 128px;">
                                    <span>
                                        <a href="javascript:void(0);" id="contact" data-id="{{session('user_id')}}">
                                            点击联系<img src="{{asset('img/contactus.gif')}}">
                                        </a>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="typebox">
                        <div class="titlebox shop_bg{{$shop['sp_templete']}}"><div class="tit">产品分类</div></div>
                        <div class="title_bot">
                            <ul>
                                @if(!empty($categories))
                                    @foreach($categories as $k=>$v)
                                        <li>
                                            <div class="border_l_b border_l_b_1"></div>
                                            <div class="type fl"><a href="{{url('/shop/products').'/'.$shop['sp_id']}}?custom_cate={{$v['id']}}" title="{{$v['name']}}">{{$v['name']}}</a></div>
                                        </li>
                                    @endforeach
                                @endif

                            </ul>
                        </div>
                    </div>
                    <div class="cetifivatebox">
                        <div class="titlebox shop_bg{{$shop['sp_templete']}}"><div class="tit">企业证书</div></div>
                        <div class="title_bot">
                            <ul>
                                @if($shop['company']['agnet_licence'])
                                <li>
                                    <div class="imgbox">
                                        <img src="{{$shop['company']['agnet_licence']}}" alt="" />
                                    </div>
                                    <a>点击查看</a>
                                </li>
                                @endif
                                @if($shop['company']['tax_certificate'])

                                <li>
                                    <div class="imgbox">
                                        <img src="{{$shop['company']['tax_certificate']}}" alt=""/>
                                    </div>
                                    <a>点击查看</a>
                                </li>
                                    @endif
                                    @if($shop['company']['organization_code_certificate'])

                                <li>
                                    <div class="imgbox">
                                        <img src="{{$shop['company']['organization_code_certificate']}}" alt="" />
                                    </div>
                                    <a>点击查看</a>
                                </li>
                                @endif
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="bigbox_right">
                    {{--<div class="classification_box">--}}
                        {{--<ul>--}}
                            {{--<li class="category">--}}
                                {{--<div class="left_box fl">--}}
                                    {{--<div class="">品类</div>--}}
                                {{--</div>--}}
                                {{--<div class="right_box fl">--}}
                                    {{--@foreach($product['categories'] as $k =>$v)--}}
                                        {{--<a href="{{Request::getRequestUri()}}{{  is_numeric(substr(Request::getRequestUri(), -1)) && strlen(Request::getRequestUri())<30?'?':'&'}}third_cat={{$v['key']}}">{{$v['name']}}</a>--}}

                                    {{--<a href="">专业智能分析</a>--}}
                                    {{--@endforeach--}}
                                {{--</div>--}}
                                {{--<div class="more">更多∨</div>--}}
                            {{--</li>--}}
                            {{--<li class="brand">--}}
                                {{--<div class="left_box fl">--}}
                                    {{--<div class="">品牌</div>--}}
                                {{--</div>--}}
                                {{--<div class="right_box fl">--}}
                                    {{--@foreach($product['brand'] as $k =>$v)--}}
                                        {{--<a href="{{Request::getRequestUri()}}{{  is_numeric(substr(Request::getRequestUri(), -1))  && strlen(Request::getRequestUri())<30?'?':'&'}}brand_id={{$v['key']}}">{{$v['name']}}</a>--}}

                                    {{--<a href="">专业智能分析</a>--}}
                                    {{--@endforeach--}}
                                {{--</div>--}}
                                {{--<div class="more">更多∨</div>--}}
                            {{--</li>--}}
                        {{--</ul>--}}
                    {{--</div>--}}
                    <form action="" method="get">
                    <div class="searchbox">
                        <div class="searchsbox">
                            <div class="wenzi fl">本店搜索</div>
                            <div class="inputbox fl">
                                <input type="text" placeholder="请输入产品名称" name="name" value="{{ isset($search['name'])?$search['name']:request('kw','') }}" />
                            </div>
                            <div class="wenzi fl">价格</div>
                            <div class="inputbox inputbox2 fl">
                                <input type="number" name="price[start]" value="{{ isset($search['price']['start'])?$search['price']['start']:request('min_price','') }}" />
                                <em>¥</em>
                            </div>
                            <div class="wenzi fl">-</div>
                            <div class="inputbox inputbox2 fl">
                                <input type="number" name="price[end]" value="{{ isset($search['price']['end'])?$search['price']['end']:request('max_price','') }}"/>
                                <em>¥</em>
                            </div>
                            <div class="submitbox fl">
                                <input type="submit" value="搜索">
                            </div>
                        </div>
                    </div>
                    </form>

                    <div class="shopbox" style=" width: 940px;">
                        <ul>
                            @foreach($product['list'] as $v)
                            <li>
                                <div class="imgbox">
                                    <a href="{{url('/product/info').'/'.$v['id'].'/'}}{{!empty($v['skus'])?$v['skus'][0]['id']:0}}" target="_blank">
                                        <img src="{{$v['cover_image']}}" alt="{{$v['name']}}" />
                                    </a>
                                </div>
                                @foreach($v['skus'] as $key =>$val)
                                    @if($key==0)

                                <div class="wordbox">
                                    <div class="price">¥{{$val['sale_price']}}</div><div class="original_price">¥ {{$val['price']}}</div>
                                    <div class="shop_name">
                                        <a href="{{url('/product/info').'/'.$v['id'].'/'}}{{!empty($v['skus'])?$v['skus'][0]['id']:0}}" target="_blank" title="">{{$v['name']}}</a>
                                    </div>
                                </div>
                                    @endif

                                @endforeach

                            </li>

                            @endforeach

                            <li class="shop_last">
                                <a href="/shop/products/{{$shop['sp_id']}}" target="_blank">
                                    <div class="wenzi">
                                        <div class="bigwenzi">浏览更多</div>
                                        <div class="smallwenzi">产品</div>
                                        <div class="picture">
                                            <img src="{{asset('/img/web/deal/row.png')}}" alt="">
                                        </div>
                                    </div>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
 @include('web.layout.footer_ware1')
</body>
</html>
<script>
    window.onload=function(){
        divWidth();
    }
    //当浏览器窗口大小改变时，设置显示内容的高度
    window.onresize=function(){
        divWidth();
    }
    function divWidth(){
        var w = document.documentElement.clientWidth;//获取页面可见高度
        $('.banner').css({'height':w*(420/1920),'overflow':'hidden'});
    }

    $(function () {

        var jud = '{{ Session::get("user_id")}}';

        var checkIm = '{{$shopImCheck}}';

        var mySwiper = new Swiper('.swiper-container', {
          autoplay: {
            delay: 3000,//1秒切换一次
          },
          pagination :{
            el: '.swiper-pagination',
            clickable :true,
          }
        });
        //input获得失去焦点效果
        $('input[type="text"]').focus(function () {
            $(this).addClass("active");
        })
        $('input[type="text"]').blur(function () {
            $(this).removeClass("active");
        })
        $('.searchbox li').click(function () {
            $(this).addClass('active').siblings().removeClass('active');
        })

        //联系方式弹框
        $('.intobox').click(function () {
            $('.mask').show();
            $('.prompt_box').show();
        })
        $('.prompt_box .closebox').click(function () {
            $('.prompt_box').hide();
            $('.mask').hide();
        })

        //企业证书放大效果
        layer.photos({
            photos: '.cetifivatebox'
            /*,area: '640px'*/
            ,anim: 0 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
            ,closeBtn:1
        });


        $('.category .more').click(function () {
            $(this).hide();
            $('.category').css('height','auto');
        });
        $('.brand .more').click(function () {
            $(this).hide();
            $('.brand').css('height','auto');
        });
    })
</script>